import { useState } from 'react';

interface IUser {
  id: number;
  user_id: string;
  user_name: string;
  login_token: string;
  avatar: string;
  total_credit: number;
  balance: number;
}

const useUser = () => {
  const [user, setUser] = useState<IUser|null>(null);
  return {
    user, setUser,
  };
};

export default useUser;
